package edu.whut.mall.pojo.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import edu.whut.mall.common.enums.Reason;
import edu.whut.mall.common.enums.RefundStatus;
import edu.whut.mall.common.enums.SfstatusRe;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * Author: smq
 * Unit: D9lab
 * Date: 2021-06-07 16:15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Refund implements Serializable {
    private static final long serialVersionUID = 11;

    //自动返回id的值
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private Integer orderTradeId;
    private Integer user;
    private String name;
    private Integer refundProduction;
    private String orderNumber;
    private Integer quantity;
    private Double refund;
    private Reason reason;
    private String content;
    private RefundStatus refundStatus;
    private SfstatusRe status;
    //退换货物流公司及运单编号
    private String company;
    private String mailCode;
    private String refundNumber;
    private String newOrderNumber;
    private Date createTime;
    private Date updateTime;
    private Boolean isDeleted;

    public Refund(Order orderTradeId, int user, String name, int refundProduction, String orderNumber, int quantity, double refund, Reason reason, String content, RefundStatus reStatus, SfstatusRe status, Boolean isDeleted, Date createTime, Date updateTime) {
        this.orderTradeId = orderTradeId.getId();
        this.user = user;
        this.name = name;
        this.refundProduction = refundProduction;
        this.orderNumber = orderNumber;
        this.quantity = quantity;
        this.refund = refund;
        this.reason = reason;
        this.content = content;
        this.refundStatus = reStatus;
        this.status = status;
        this.isDeleted = isDeleted;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

}
